<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test javascript</title>
<script type="text/javascript">
    function callBack(){
        //window.webkit.messageHandlers.sayhello.postMessage({body: 'hello world!',para:{name:a,six:a}});
    //alert(a);
    //self.location=document.referrer;
    document.getElementById("tttss").html='434343434';
    
}
</script>
<script>
    function say()
    {
        document.getElementById("tttss").innerHTML='434343434';
        //前端需要用 window.webkit.messageHandlers.注册的方法名.postMessage({body:传输的数据} 来给native发送消息
        //window.webkit.messageHandlers.sayhello.postMessage({body: 'hello world!',para:{name:'1',six:'2'}});
    }
</script>

</head>
<body>
<div>
<button name="email" onclick="say();" >点击我然后看xcode的log</button>
<form>
    First name:<br>
    <input type="text" name="f" value="WANG">
        <br>
        Last name:<br>
        <input type="text" name="l" value="JUNJIE">
        
</form> 
</div>
<div id="tttss"></div>
</body>
</html>
